package javabean.MerchantInfo;

import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel(description = "银行卡信息")
public class ElecCardList {

    @Alias("prov_id")
    @ApiModelProperty(value = "银行所在省【参考省市区编码表； 示例值：310000】", required = false)
    @Length(min = 1, max = 6, message = "provId 长度范围：1~6")
    private String provId;

    @Alias("area_id")
    @ApiModelProperty(value = "银行所在市【参考省市区编码表； 示例值：310100】", required = false)
    @Length(min = 1, max = 6, message = "areaId 长度范围：1~6")
    private String areaId;

    @Alias("bank_code")
    @ApiModelProperty(value = "银行编码【参考银行编码；示例值：01020000】", required = true)
    @NotBlank(message = "bankCode不能为空")
    @Length(min = 1, max = 8, message = "bankCode 长度范围：1~8")
    private String bankCode;

    @Alias("branch_code")
    @ApiModelProperty(value = "支行联行号【参考：银行支行编码；示例值：102290026507】", required = true)
    @NotBlank(message = "branchCode不能为空")
    @Length(min = 1, max = 12, message = "branchCode 长度范围：1~12")
    private String branchCode;

    @Alias("branch_name")
    @ApiModelProperty(value = "支行名称【示例值：中国工商银行上海市中山北路支行】", required = true)
    @NotBlank(message = "branchName不能为空")
    @Length(min = 1, max = 64, message = "branchName 长度范围：1~64")
    private String branchName;

    @Alias("card_name")
    @ApiModelProperty(value = "银行账户名【银行卡对应的户名；示例值：上海汇付支付有限公司】", required = true)
    @NotBlank(message = "cardName不能为空")
    @Length(min = 1, max = 128, message = "cardName 长度范围：1~128")
    private String cardName;

    @Alias("card_no")
    @ApiModelProperty(value = "银行卡号【示例值：98140008801800008888】", required = true)
    @NotBlank(message = "cardNo不能为空")
    @Length(min = 1, max = 32, message = "cardNo 长度范围：1~32")
    private String cardNo;

    @Alias("card_type")
    @ApiModelProperty(value = "银行账户类型【0:对公， 1:对私法人，仅限个体工商户；示例值：0】", required = true)
    @NotBlank(message = "cardType不能为空")
    @Length(min = 1, max = 1, message = "cardType 长度范围：1~1")
    private String cardType;

    @Alias("default_cash_flag")
    @ApiModelProperty(value = "默认卡标识【0：非默认卡 1：默认卡(不填，默认为0)；示例值：0】", required = false)
    @Length(min = 1, max = 1, message = "defaultCashFlag 长度范围：1~1")
    private String defaultCashFlag;

}